#ifndef __EI_MAI_SMART_HAND_H__
#define __EI_MAI_SMART_HAND_H__

#ifdef __cplusplus
#if __cplusplus
extern "C" {
#endif
#endif

/************hand nna result************/
typedef struct eiMADP_SMART_HAND_RESULT_S {
	EI_S32      s32Rect[4];
	EI_FLOAT    f32Score;
    EI_DOUBLE   d32TimesTamp;
	EI_S32		s32Class;
	EI_S32		s32ID;
	EI_S32		s32Flag;
} EI_MADP_SMART_HAND_RESULT_S;

typedef struct eiMADP_SMART_HAND_RESULTS_S {
       EI_U32 u32Num;
       EI_U32 u32FrameWidth;
       EI_U32 u32FrameHeight;
       EI_S32 s32FrameId;
       EI_MADP_SMART_HAND_RESULT_S stHandRect[DEFAULT_NNA_HAND_DET_CONFIG_MAX_DET_CNT];
       //for nna
       EI_U32 NnaHandle;
       EI_NNA_DST_HANDDETS_S stNnaResult;
	   EI_NNA_DST_HANDDETS_S stNnaWaveResult;
} EI_MADP_SMART_HAND_RESULTS_S;

typedef struct eiMADP_SMART_HAND_VENC_DATA_S {
	EI_VOID *pVStreamData;
	EI_U8 *pu8Addr;
	EI_U32 au32Len;
} EI_MADP_SMART_HAND_VENC_DATA_S;

typedef struct eiMADP_SMART_HAND_CAP_RESULTS_S {
	EI_MADP_SMART_HAND_RESULTS_S *pstHandResult;
	// cap frame image
	EI_MADP_SMART_FRAME_S *pstSmartFrame;
} EI_MADP_SMART_HAND_CAP_RESULTS_S;

typedef struct eiMADP_SMART_HAND_VENC_RESULT_S {
	EI_MADP_SMART_HAND_CAP_RESULTS_S *pstSmartCapResults;
    EI_S32 HandIdx;
	EI_U64 u64Timestamp;
} EI_MADP_SMART_HAND_VENC_RESULT_S;

typedef struct eiMADP_SMART_HAND_SNAP_RESULT_S {
	EI_MADP_SMART_HAND_VENC_RESULT_S *pstHandVencResultData;
	EI_MADP_SMART_HAND_VENC_DATA_S *pstBgVencData;
    EI_MADP_SMART_HAND_VENC_DATA_S *pstVencData;
} EI_MADP_SMART_HAND_SNAP_RESULT_S;

typedef EI_S32 (*PFN_SMART_HAND_DATA_CB)
       (EI_HANDLE hHandCap, EI_MADP_SMART_FRAME_S *pstSmartFrame,
       EI_MADP_SMART_HAND_RESULTS_S *pstDetResults, EI_VOID *pPrivData);


typedef EI_S32 (*PFN_SMART_HAND_SnapDataCB)(EI_HANDLE hHandCap,
	EI_MADP_SMART_HAND_SNAP_RESULT_S *pstSmartHandSnapResults, EI_VOID *pPrivData);

/** the attribute of smart motion det*/
typedef struct eiMADP_SMART_HAND_CFG_S {
    EI_BOOL     bHanddetEnable;
    EI_BOOL     bGestureEnable;
	EI_BOOL     bTrkEnable;
	EI_BOOL     bWaverecgEnable;
    EI_BOOL     bHanddetDrawBoxEnable;
    EI_BOOL     bBgEnable;

    EI_S32      s32CapMode;
    EI_S32      s32CapInterval;
    EI_S32      s32CapJpegQuality;

    EI_U32      u32FrameWidth;
    EI_U32      u32FrameHeight;

    PFN_SMART_HAND_SnapDataCB pfnCapDataCB;
    PFN_SMART_HAND_DATA_CB pfnDataCB;
    EI_VOID *pPrivateData;
} EI_MADP_SMART_HAND_CFG_S;


/** the attribute of smart mbgs cap*/
typedef struct eiMADP_SMART_HAND_ATTR_S {
	/* init attr start*/
	EI_HANDLE Vproc;
	EI_HANDLE Vport;
	EI_HANDLE VencChn;
	EI_HANDLE Det;

	EI_MADP_SMART_HAND_CFG_S smartHandCfg;
    EI_NNA_HANDDET_CONFIG_S stHanddetConfig;
    EI_NNA_GESTURE_CONFIG_S stGestureConfig;
	EI_NNA_HANDTRK_CONFIG_S stHandtrkConfig;
	EI_NNA_WAVEHAND_CONFIG_S stWavehandConfig;
} EI_MADP_SMART_HAND_ATTR_S;

#ifdef __cplusplus
#if __cplusplus
}
#endif
#endif

#endif /* __EI_MAI_SMART_HAND_H__ */
